// 验证token真伪
const express = require('express');
const token = require('../utils/token');
const formatData = require('../utils/tool');
const router = express();

router.get('/',(req,res)=>{
    const {authorization} = req.query;

    // true则code=1,false则code=0
    if(token.decrypt(authorization)){
        res.send(formatData())
    }else{
        res.send(formatData({
            code:0
        }))
    }
    
})

module.exports = router;
